import http from '@http';

const API_PREFIX = '/system/user';

export function fetchGetUserList(values = {}) {
  return http.post(API_PREFIX + '/list', values);
}

export function fetchGetUser(userId) {
  return http.get(API_PREFIX + `/detail/${userId}`);
}

export function fetchAddUser(params) {
  return http.post(API_PREFIX + '/insert', params);
}

export function fetchUpdateUser(params) {
  return http.post(API_PREFIX + '/update', params);
}

export function fetchUpdateUserStatus(params) {
  return http.post(API_PREFIX + '/update/status', params);
}

export function fetchDeleteUser(ids) {
  return http.post(API_PREFIX + '/delete', ids);
}

export function fetchGetExportParams() {
  return http.get(API_PREFIX + '/export/params');
}

export function fetchExportUser(params = {}) {
  return http.post(API_PREFIX + '/export', params);
}
